package org.jb.coinche.server.rooms;

import org.jb.coinche.client.guistatemachine.RoomService;

import com.google.inject.Inject;
import com.google.inject.Singleton;

/**
 * 
 * @author jeremie
 *
 */
@Singleton
public class RoomServiceImpl implements RoomService {

	private RoomScope scope;

	/**
	 * 
	 * @param scope
	 */
	@Inject
	public RoomServiceImpl( RoomScope scope ) {
		this.scope = scope;
	}
	
	/**
	 * 
	 */
	@Override
	public String[] getRooms() {
		return scope.getRoomsName();
	}

	/**
	 * 
	 */
	@Override
	public void removeRoom(String room) {
		scope.removeRoom(room);
	}

}
